package org.spring.demo.web.city;

import java.util.List;

import org.spring.demo.entity.City;
import org.spring.demo.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/city")
public class CityController {
	
	@Autowired
	private CityService cityService;
	@RequestMapping("list")
	@ResponseBody
	public List<City> getCityList(){
		List<City> list = cityService.getCityList();
		return list;
		
	}
	
}
